<template>
  <footer>
    <span class="grey--text"><a href="https://beian.miit.gov.cn/" target="_blank">陇ICP备2022001036号</a> &nbsp;&nbsp;&nbsp; ©2021 My Blog</span>
    <p class="grey--text">勉强运行：{{ runTime }}</p>
    <p class="grey--text"></p>
  </footer>
</template>

<script>
export default {
  name: "Footer",
  mounted() {
    setInterval(this.getRunTime, 1000);
  },
  data() {
    return {
      runTime: ""
    };
  },
  methods: {
    getRunTime() {
      const time = new Date().getTime() - Date.parse("2021-02-17 21:58:00");
      this.runTime = `${parseInt(time / (24 * 3600 * 1000))}天${parseInt(
        (time % (24 * 3600 * 1000)) / (3600 * 1000)
      )}时
      ${parseInt((time % (3600 * 1000)) / (60 * 1000))}分${parseInt(
        (time % (60 * 1000)) / 1000
      )}秒`;
    }
  }
};
</script>

<style scoped>
footer {
  padding: 10px 0;
  text-align: center;
  color: #b9b9b9;
  font-size: 14px;
  font-family: "Comic Sans MS", "华文行楷", "黑体", "JetBrains Mono", serif !important;
}
footer a {
  text-decoration: none;
  color: #b9b9b9;
  font-size: 14px;
  font-family: "Comic Sans MS", "华文行楷", "黑体", "JetBrains Mono", serif !important;
}
footer a:hover {
  text-decoration: underline;
}
</style>
